package com.example.thread.demo.util;

/**
 * @author zhy
 * @version 1.0.0
 * @ClassName ThreadPoolTestRunnable.java
 * @Description TODO
 * @createTime 2021年01月14日 19:59:00
 */
public class ThreadPoolTestRunnable implements Runnable {

    private Integer index;

    public ThreadPoolTestRunnable(Integer index) {
        this.index = index;
    }

    @Override
    public void run() {
        try {
            System.out.println(index + "开始处理线程！");
            Thread.sleep(50);
            System.out.println("线程标识是：" + this.toString());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
